package com.xiaomage.view.draw13

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val myView1=MyView1(this)
        val params=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                500
        )
        myView1.layoutParams=params

        val myView2=MyView2(this)
        myView2.layoutParams=params
        ll_zong.addView(myView1)
        ll_zong.addView(myView2)
    }
}
